
import React from 'react'
import { View } from '@tarojs/components'
import classnames from 'classnames'


import './index.scss'
export interface IInfoProps {
    dot?: boolean
    info?: string
    customStyle?: React.CSSProperties
}

export const Info: React.FunctionComponent<IInfoProps> = ({
    info,
    dot,
    customStyle
}) => {

    return (
        info !== null && info !== undefined && info !== '' || dot ?
            <View
                className={classnames('xxm-info', { 'xxm-info--dot': dot })}
                style={customStyle}
            >{dot ? '' : info}</View> : null
    )
}